(tty_setup_colors): Treat any negative argument as -1.
authorEli Zaretskii <eliz@gnu.org>
Sun, 28 Sep 2003 20:49:19 +0000 (20:49 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 28 Sep 2003 20:49:19 +0000 (20:49 +0000)
src/term.c

index dba6b0e4a5207b278db47a2412c9cd792280326b..8e4eb21c362dd63729258bd4b175bebd6cafeb48 100644 (file)
@@ -2066,6 +2066,10 @@ void
 tty_setup_colors (mode)
      int mode;
 {
+  /* Canonicalize all negative values of MODE.  */
+  if (mode < -1)
+    mode = -1;
+
   switch (mode)
     {
       case -1:  /* no colors at all */